package com.woniuxy.micromedicalserver.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.security.Principal;

/**
 * 用户bean
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserBean implements Serializable, Principal {

  private Integer id;
  private String userName;
  private String password;
  private String phone;

  //用户信息需继承 Principal 并实现 getName() 方法，返回全局唯一值
  @Override
  public String getName() {
    return this.userName;
  }
}
